package wyj;

import java.util.Scanner;

class Main4 {
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        int n,m,sum,z;
        n=in.nextInt();
        m=in.nextInt();
        sum=0;
        while (n>0&n<=m&m<=200){
            if (n==1){
                z=2;

            }
            else{
                z=3+2*(n-2);
            }

            if (z%2==0&z%3==0&z%5==0&z%7==0){
                sum=sum+z+2;

            }
            else{
                sum=sum+z;
            }
            n++;

        }
        System.out.println(sum);

    }
}
